<div class="title title-spacing">
<h3><?php echo __('Manage blogs')?></h3>
</div>
<p><a href="<?php
echo $this->url(array('action' => 'create-blog'))?>"><?php
echo __('Create new blog')?></a></p>

<?php if (count($this->blogsDataGrid) > 0): ?>
<table class="grid">
	<thead>
		<th><?php echo $this->paginationSort('ID', 'id')?></th>
		<th><?php echo $this->paginationSort('Title', 'title')?></th>
		<th><?php echo $this->paginationSort('Created', 'created')?></th>
		<th><?php echo $this->paginationSort('Type')?></th>
		<th><?php echo $this->paginationSort('Owner')?></th>
		<th><?php echo __('Actions')?></th>
	</thead>
	<tbody>
	<?php
	foreach($this->blogsDataGrid as $blog) { ?>
		<tr
			class="<?php
    echo $this->cycle(array("odd" , "even"))->next()?>">
			<td><?php
			echo $blog->getId()?></td>
			<td><?php
			echo $blog->getTitle()?></td>
			<td><?php
			echo date("Y-t-d", strtotime($blog->getDateCreated()))?></td>
			<td><?php echo __($this->blogTypes[$blog->getType()])?></td>
			<td><?php echo $blog->getFirstName()?> <?php echo $blog->getLastName()?></td>
			<td><a
				href="<?php echo $this->url(array('action' => 'update-blog' , 'id' => $blog->getId(), 'page' => null))?>"><?php echo __('Edit')?></a>
			<a
				href="<?php echo $this->url(array('action' => 'delete-blog' , 'id' => $blog->getId(), 'page' => null))?>"><?php echo __('Delete')?></a>
			</td>
		</tr>
		<?php
	}

	?>
	</tbody>
</table>

<p><?php echo $this->paginationControl($this->blogsDataGrid)?></p>

	<?php else: ?>
<p><?php echo __('No blogs here')?></p>
	<?php endif;